package com.huanong.service.impl;
/*
 *@Author:anran
 *@Date:2020/12/8
 *@Version 1.0
 */

import com.huanong.mapper.TypesMapper;
import com.huanong.pojo.Types;
import com.huanong.service.TypesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypesServiceImpl implements TypesService {

    @Autowired
    private TypesMapper typesMapper;

    @Override
    public List<Types> query() {
        return typesMapper.query();
    }

    @Override
    public Types queryById(Integer TsId) {
        Types types=typesMapper.queryById(TsId);
        return types;
    }

    @Override
    public int add(Types types) {
        int flag=typesMapper.addTypes(types);
        return flag;
    }

    @Override
    public int delete(Integer TsId) {
        return typesMapper.deleteTypes(TsId);
    }

    @Override
    public int update(Types types) {
        return typesMapper.updateTypes(types);
    }
}
